package com.lcp.entity;

import com.lcp.utils.SignalUtil;

import java.util.List;

public abstract class Geometry2D {
    protected int sharp;
    protected List<Point2D> border;
    public String borderToStr(){
        StringBuffer res = new StringBuffer();
        if(border!=null && border.size()>0){
            for (int i = 0; i < border.size(); i++) {
                res.append(border.toString());
                if(i<border.size()-1) {
                    res.append(SignalUtil.semicolon);
                }
            }
        }
        return res.toString();
    }

    /**
     * 计算中心点
     * @return
     */
    public abstract Point2D getCenter();
}
